import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)


export default new Vuex.Store({
  state: {

    // 用户信息
    dataUser: '',
    // 登录注册弹框的状态值
    popUpLogin: false,
    popUpSignIn: false,
    roomsource:'',
    sharehot:'',
    shareroom:'',
    history:'',
    collect:'',
    user:''
  },
  mutations: {

    // 修改登录注册弹窗的状态值
    setPopUpLogin(state) {
      state.popUpLogin = !state.popUpLogin
    },
    setPopUpSignIn(state) {
      state.popUpSignIn = !state.popUpSignIn
    },
    saveRoomsource(state,roomsource){
      state.roomsource=roomsource
    },
    saveSharehot(state,sharehot){
      state.sharehot=sharehot
    },
    saveRoomshare(state,shareroom){
      state.shareroom=shareroom
    },
    saveHistory(state,historylist){
      state.history=historylist
    },
    saveCollect(state,collect){
      state.collect=collect
    },
    saveUser(state,user){
      state.user=user
    }


  },
  actions: {},
  modules: {}
})